# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=lavalauncher
pkgver=2.1.1
pkgrel=0
pkgdesc="Simple launcher panel for Wayland desktops"
url="https://git.sr.ht/~leon_plickat/lavalauncher"
license="GPL-3.0-or-later"
arch="all"
makedepends="
	meson
	cairo-dev
	wayland-dev
	wayland-protocols
	libxkbcommon-dev
	scdoc
	"
subpackages="$pkgname-doc"
source="$pkgname-v$pkgver.tar.gz::https://git.sr.ht/~leon_plickat/lavalauncher/archive/v$pkgver.tar.gz
	fix-svg-icon-scale.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"

# enable SVG image support where possible
case "$CARCH" in
	s390x|riscv64) ;;
	*) makedepends="$makedepends librsvg-dev" ;;
esac

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
803ada681f91f67e9de415d7ad3ef4f40d646eeeb21fbd784a4500b8d38708819c639ea926bdf4f01c892c116d6dd84d4d84ab97cf6fd371ce977ffa1b328737  lavalauncher-v2.1.1.tar.gz
29b366d0dcbeedd6ae88f00c7a66024f96f5ce4f84bc9f8247fc225fa2aef3b21c707378a322f5310d1b518fff275ef3ad30a30d39b781ea3fe13b5697da7caf  fix-svg-icon-scale.patch
"
